﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using UwaySoft.EsheetServer.Help.Template;
using System.IO;

namespace UwaySoft.EsheetServer.Help.Response
{
    public class AutoCheckResponse : BaseTemplate, IResponse
    {
        public string ReturnNo { get; set; }

        public string SerialInfoNo { get; set; }

        public string Remark { get; set; }

        public override string ToString()
        {
            var xDoc = new XDocument(
                new XElement("esheet_autochecked",
                    new XElement("returnInfo",
                        new XElement("returnNo", ReturnNo),
                        new XElement("serialInfoNo", SerialInfoNo),
                        new XElement("remark", Remark))));

            return string.Format(
                "<?xml version=\"1.0\" encoding=\"gb2312\"?>{0}", xDoc.ToString(SaveOptions.DisableFormatting));
        }
    }
}
